import request from '@/utils/request'

// 查询家谱图列表
export function listFamTree() {
  return request({
    url: '/system/famTree/memberships',
    method: 'get',

  })
}

// 查询家谱图详细
export function getFamTree(memberId) {
  return request({
    url: '/system/famTree/' + memberId,
    method: 'get'
  })
}

// 新增家谱图
export function addFamTree(data) {
  return request({
    url: '/system/famTree',
    method: 'post',
    data: data
  })
}

// 修改家谱图
export function updateFamTree(data) {
  return request({
    url: '/system/famTree',
    method: 'put',
    data: data
  })
}
// 查询成员下拉树结构
export function treeselect() {
  return request({
    url: '/system/member/memberTreeselect',
    method: 'get'
  })
}
// 删除家谱图
export function delFamTree(memberId) {
  return request({
    url: '/system/famTree/' + memberId,
    method: 'delete'
  })
}
